package com.easylinkin.linkappapi.airconditioner.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName(value = "ac_aircondition_device_record")
public class AirconditionDeviceRecord extends Model<AirconditionDeviceRecord> {
    /**
     * 设备编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 空调子设备表id
     */
    @TableField(value = "aircondition_device_id")
    private String airconditionDeviceId;

    /**
     * 当前模式 1--制冷 2--制热
     */
    @TableField(value = "type")
    private Integer type;

    /**
     * 1--低风 2--中风 3--高风
     */
    @TableField(value = "fan_speed")
    private Integer fanSpeed;

    /**
     * 时长（分钟）
     */
    @TableField(value = "duration")
    private BigDecimal duration;


    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    /**
     * 低风P
     */
    @TableField(exist = false)
    private BigDecimal lowFan=BigDecimal.ZERO;

    /**
     * 低风P时长
     */
    @TableField(exist = false)
    private BigDecimal lowFanDuration=BigDecimal.ZERO;

    /**
     * 中风P
     */
    @TableField(exist = false)
    private BigDecimal midFan=BigDecimal.ZERO;

    /**
     * 中风P时长
     */
    @TableField(exist = false)
    private BigDecimal midFanDuration=BigDecimal.ZERO;

    /**
     * 高风P
     */
    @TableField(exist = false)
    private BigDecimal highFan=BigDecimal.ZERO;

    /**
     * 高风P时长
     */
    @TableField(exist = false)
    private BigDecimal highFanDuration=BigDecimal.ZERO;

    /***
     * 查询开始时间
     */
    @TableField(exist = false)
    private Date queryStartTime;

    /***
     * 查询结束时间
     */
    @TableField(exist = false)
    private Date queryEndTime;

    @TableField(exist = false)
    private AirconditionDevice airconditionDevice;

    @TableField(exist = false)
    private List<String> ids;
    /***
     * 总耗能
     */
    @TableField(exist = false)
    private BigDecimal totalEnergy=BigDecimal.ZERO;

    /***
     * 开机时长
     */
    @TableField(exist = false)
    private BigDecimal bootTime=BigDecimal.ZERO;

    @TableField(exist = false)
    private String  hostDeviceId;

    /**
     * 设备名称
     */
    @TableField(exist = false)
    private String deviceName;

    @TableField("tenant_id")
    private String tenantId;//'租户id'

    /***
     * 区域
     */
    @TableField(exist = false)
    private List<String> areaPath;

    /***
     * 电表ID
     */
    @TableField(exist = false)
    private String wattmeterId;

    /***
     * 完成状态
     */
    @TableField("complete_status")
    private Integer completeStatus;

    @TableField(exist = false)
    private String functionIdentifier;//固定值：air_conditioner
}